package com.xydpeng.rpc.protocol;

/**
 * @author xydpeng
 * @version v1.0
 * @date: 2023/4/8
 * @description:
 */
public class ServiceConfig<T> {

    /**
     * The interface class of the exported service
     */
    protected Class<?> interfaceClass;

    /**
     * The reference of the interface implementation
     */
    protected transient T ref;

    public ServiceConfig(Class<?> interfaceClass, T ref) {
        this.interfaceClass = interfaceClass;
        this.ref = ref;
    }

    public Class<?> getInterfaceClass() {
        return interfaceClass;
    }

    public void setInterface(Class<?> interfaceClass) {
        this.interfaceClass = interfaceClass;
    }

    public T getRef() {
        return ref;
    }

    public void setRef(T ref) {
        this.ref = ref;
    }
}
